3.428 \(\int \frac{A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac{3}{2}}(c+d x)} \, dx\)

Optimal. Leaf size=61 \[ -\frac{2 (A-C) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 A \sin (c+d x)}{d \sqrt{\cos (c+d x)}}+\frac{2 B F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d} \]

[Out]

(-2*(A - C)*EllipticE[(c + d*x)/2, 2])/d + (2*B*EllipticF[(c + d*x)/2, 2])/d + (2*A*Sin[c + d*x])/(d*Sqrt[Cos[
c + d*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.0881948, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129, Rules used = {3021, 2748, 2641, 2639} \[ -\frac{2 (A-C) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 A \sin (c+d x)}{d \sqrt{\cos (c+d x)}}+\frac{2 B F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/Cos[c + d*x]^(3/2),x]

[Out]

(-2*(A - C)*EllipticE[(c + d*x)/2, 2])/d + (2*B*EllipticF[(c + d*x)/2, 2])/d + (2*A*Sin[c + d*x])/(d*Sqrt[Cos[
c + d*x]])

Rule 3021

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m +
 1)*(a^2 - b^2)), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B + a*
C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e,
 f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 2641

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticF[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ
[{c, d}, x]

Rule 2639

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticE[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ[{
c, d}, x]

Rubi steps

\begin{align*} \int \frac{A+B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac{3}{2}}(c+d x)} \, dx &=\frac{2 A \sin (c+d x)}{d \sqrt{\cos (c+d x)}}+2 \int \frac{\frac{B}{2}-\frac{1}{2} (A-C) \cos (c+d x)}{\sqrt{\cos (c+d x)}} \, dx\\ &=\frac{2 A \sin (c+d x)}{d \sqrt{\cos (c+d x)}}+B \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx+(-A+C) \int \sqrt{\cos (c+d x)} \, dx\\ &=-\frac{2 (A-C) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 B F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 A \sin (c+d x)}{d \sqrt{\cos (c+d x)}}\\ \end{align*}

Mathematica [A]  time = 0.186119, size = 54, normalized size = 0.89 \[ \frac{2 \left ((C-A) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )+\frac{A \sin (c+d x)}{\sqrt{\cos (c+d x)}}+B F\left (\left .\frac{1}{2} (c+d x)\right |2\right )\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/Cos[c + d*x]^(3/2),x]

[Out]

(2*((-A + C)*EllipticE[(c + d*x)/2, 2] + B*EllipticF[(c + d*x)/2, 2] + (A*Sin[c + d*x])/Sqrt[Cos[c + d*x]]))/d

________________________________________________________________________________________

Maple [A]  time = 0.184, size = 194, normalized size = 3.2 \begin{align*} -2\,{\frac{A\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -2\,A\cos \left ( 1/2\,dx+c/2 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -C\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) }{\sin \left ( 1/2\,dx+c/2 \right ) \sqrt{2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2),x)

[Out]

-2*(A*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))-2*A*
cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2+B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*Ellipt
icF(cos(1/2*d*x+1/2*c),2^(1/2))-C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(
1/2*d*x+1/2*c),2^(1/2)))/sin(1/2*d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A}{\cos \left (d x + c\right )^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2),x, algorithm="maxima")

[Out]

integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)/cos(d*x + c)^(3/2), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A}{\cos \left (d x + c\right )^{\frac{3}{2}}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2),x, algorithm="fricas")

[Out]

integral((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)/cos(d*x + c)^(3/2), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)**2)/cos(d*x+c)**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A}{\cos \left (d x + c\right )^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2),x, algorithm="giac")

[Out]

integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)/cos(d*x + c)^(3/2), x)